home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The CICA Windows Explosion!
/
The CICA Windows Explosion! - Disc 2.iso
/
winword
/
collec.zip
/
KEYS.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-06-28
|
1KB
|
48 lines
DEFINT A-Z
DECLARE SUB ParseAndWrite (ffFile$, ffTitle$, ffKeyWord$)
'**********************************
'This program reads in the .CSV file created by the Collector macro in
'WinWord, and parses out the keywords.
DIM ffFile$, ffTitle$, KeyTitle$, HelpID$, Browse$, ffKeyWord$, Comments$, BuildTag$, EntryMacro$
DIM done
ON ERROR GOTO OUTTAHERE
OPEN "tracker.csv" FOR INPUT AS #1
OPEN "keys.csv" FOR OUTPUT AS #2
DO
INPUT #1, ffFile$, ffTitle$, KeyTitle$, HelpID$, Browse$, ffKeyWord$, Comments$, BuildTag$, EntryMacro$
ParseAndWrite ffFile$, ffTitle$, ffKeyWord$
LOOP WHILE NOT EOF(1)
SYSTEM
OUTTAHERE:
PRINT "Error "; ERR; " - "; ERROR$
CLOSE #1
CLOSE #2
SYSTEM
'****************************************
SUB ParseAndWrite (ffFile$, ffTitle$, ffKeyWord$)
s = 0: temp$ = "": KeyLength = LEN(ffKeyWord$)
WHILE s < KeyLength
k$ = MID$(ffKeyWord$, s + 1, 1)
IF k$ = ";" THEN
WRITE #2, temp$, ffTitle$, ffFile$
temp$ = ""
s = s + 1
ELSE
temp$ = temp$ + k$
s = s + 1
END IF
WEND
IF temp$ <> "" THEN
WRITE #2, temp$, ffTitle$, ffFile$
END IF
END SUB